namespace ChuTiJingTai.Models
{
    /// <summary>
    /// 试卷模型
    /// </summary>
    public class ExamPaper
    {
        /// <summary>
        /// 试卷ID
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 试卷标题
        /// </summary>
        public string Title { get; set; } = string.Empty;

        /// <summary>
        /// 试卷类型
        /// </summary>
        public string Type { get; set; } = string.Empty;

        /// <summary>
        /// 对应的孩子ID
        /// </summary>
        public int ChildId { get; set; }

        /// <summary>
        /// 题目列表
        /// </summary>
        public List<Question> Questions { get; set; } = new();

        /// <summary>
        /// 答案字符串
        /// </summary>
        public string AnswerSheet { get; set; } = string.Empty;

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 难度等级
        /// </summary>
        public string Difficulty { get; set; } = "标准";

        /// <summary>
        /// 生成模式
        /// </summary>
        public string GenerateMode { get; set; } = "标准";
    }

    /// <summary>
    /// 题目模型
    /// </summary>
    public class Question
    {
        /// <summary>
        /// 题目ID
        /// </summary>
        public string Id { get; set; } = string.Empty;

        /// <summary>
        /// 题目类型
        /// </summary>
        public string Type { get; set; } = string.Empty;

        /// <summary>
        /// 题目内容
        /// </summary>
        public string Content { get; set; } = string.Empty;

        /// <summary>
        /// 正确答案
        /// </summary>
        public string Answer { get; set; } = string.Empty;

        /// <summary>
        /// 题目分值
        /// </summary>
        public int Score { get; set; } = 1;
    }

    /// <summary>
    /// 试卷类型枚举
    /// </summary>
    public static class ExamTypes
    {
        public const string MathApplication = "数学应用题";
        public const string ChinesePinyinToHanzi = "语文看拼音写汉字";
        public const string ChineseHanziToPinyin = "语文看汉字写拼音";
        public const string ChineseEssayReading = "语文优秀作文阅读";
        public const string Comprehensive = "通用综合试卷";

        public static List<string> GetAll() => new() 
        { 
            MathApplication, 
            ChinesePinyinToHanzi, 
            ChineseHanziToPinyin, 
            ChineseEssayReading, 
            Comprehensive 
        };
    }
} 